package com.winai.launcher.utils;

import android.app.Dialog;

/**
 * Created by Administrator on 2019/3/22 0022.
 */

public class Tools {
    /**
     * 显示对话框
     */
    public static void showDialog(Dialog dialog) {
        if (dialog != null && !dialog.isShowing())
            try {
                dialog.show();
            } catch (Exception e) {
            }
    }

    /**
     * 关闭对话框
     */
    public static void dimssDialog(Dialog dialog) {
        if (dialog != null && dialog.isShowing())
            try {
                dialog.dismiss();
            } catch (Exception e) {
                e.printStackTrace();
            }
    }
}
